#include <QMap>
#include "track_data_selected_inquired.h"

Track_data_selected_inquired* Track_data_selected_inquired::instance_ = nullptr;

Track_data_selected_inquired::Track_data_selected_inquired(QObject *parent) :
    QObject(parent),
    selected_inquired_(new QMap<QString, QString>()),
    is_actived_(false)
{
//    instance_ = nullptr;
}

Track_data_selected_inquired::~Track_data_selected_inquired()
{
    if (nullptr != selected_inquired_) {
        delete selected_inquired_;
        selected_inquired_ = nullptr;
    }

//    if (nullptr != instance_) {
//        delete instance_;
//        instance_ = nullptr;
//    }
}

Track_data_selected_inquired *Track_data_selected_inquired::get_instance()
{
    if (nullptr == instance_) {
        instance_ = new Track_data_selected_inquired();
    }

    return instance_;
}

QMap<QString, QString> *Track_data_selected_inquired::get_selected_inquired()
{
    return selected_inquired_;
}

bool Track_data_selected_inquired::inquiry_is_actived() const
{
    return is_actived_;
}

void Track_data_selected_inquired::setup_inquired(bool flag)
{
    is_actived_ = flag;
}
